
lang.hbgk.bin: $(GUI_LANG_TAR)
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_EXTRACT) -p $(RM_PT_JFFS2) -n hb1 -l $(shell basename $(OUTPUT_CFG))/logo/$(GUI_LANG_TAR_NAME)
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

uboot.hbgk.bin: uboot.bin key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_BIN) -n m-boot -l uboot.bin -t $(RM_FLT_SPI_NOR) 0x0 0x40000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

env.hbgk.bin: env.bin key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_BIN) -n env -l env.bin -t $(RM_FLT_SPI_NOR) 0x40000 0x10000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

logo.hbgk.bin: logo.jpg key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_BIN) -n logo -l logo.jpg -t $(RM_FLT_SPI_NOR) 0x50000 0x10000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

kernel.hbgk.bin: uImage key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_BIN) -n kernel -l uImage -t $(RM_FLT_SPI_NOR) 0x60000 0x180000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@
	
root.hbgk.bin: root.hbgk.cramfs key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_CRAMFS) -n rootfs -l root.hbgk.cramfs -t $(RM_FLT_SPI_NOR) 0x1E0000 0x100000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@
	
usr.hbgk.bin: $(USR_CRAMFS_NAME)
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_CRAMFS) -n usr -l $(USR_CRAMFS_NAME) -t $(RM_FLT_SPI_NOR) 0x2E0000 0xA00000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

web.hbgk.bin: $(WEB_CRAMFS_NAME)
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_CRAMFS) -n web -l $(WEB_CRAMFS_NAME) -t $(RM_FLT_SPI_NOR) 0xCE0000 0x1A0000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

usr1.hbgk.bin: cfg.hbgk.jffs2 key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_JFFS2) -n hb1 -l cfg.hbgk.jffs2 -t $(RM_FLT_SPI_NOR) 0xE80000 0x100000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

backup.hbgk.bin: backup.hbgk.jffs2 key
	@$(ECHO) [$@] Changed file:$?
	$(UPGRADE_MAKER) -f $(RM_FT_ERASURE) -p $(RM_PT_JFFS2) -n backup -l backup.hbgk.jffs2 -t $(RM_FLT_SPI_NOR) 0xF80000 0x80000
	mv $(UPGRADE_MAKER_OUTPUT_NAME) $@

JFFS2_ERASE_SIZE	= 0x10000

$(OUTPUT_USR_BIN)/$(SYS_CRAMFS_NAME): $(shell find $(OUTPUT_SYS_FS) 2>/dev/null)
	@$(ECHO) [$@] Changed file:$?
	$(MKDIR) -p $(OUTPUT_USR_BIN)
	$(MK_CRAMFS) $(OUTPUT_SYS_FS) $@

$(USR_CRAMFS_NAME): $(OUTPUT_USR_BIN)/$(SYS_CRAMFS_NAME) $(shell find $(OUTPUT_USR_FS) 2>/dev/null)
	@$(ECHO) [$@] Changed file:$?
	$(MK_CRAMFS) $(OUTPUT_USR_FS) $@

$(WEB_CRAMFS_NAME): $(shell find $(OUTPUT_WEB_FS) 2>/dev/null)
	@$(ECHO) [$@] Changed file:$?
	$(WEB_JS_COMPRESS_SH)
	$(MK_CRAMFS) $(OUTPUT_WEB_FS) $@

cfg.hbgk.jffs2: $(CFG_DIR_NAME)/logo/key $(GUI_LANG_TAR) $(shell find $(OUTPUT_CFG) 2>/dev/null)
	@$(ECHO) [$@] Changed file:$?
	$(MK_JFFS2) -d $(CFG_DIR_NAME) -l -e $(JFFS2_ERASE_SIZE) -o $@

backup.hbgk.jffs2: $(shell find $(BAK_DIR_NAME) 2>/dev/null)
	@$(ECHO) [$@] Changed file:$?
	$(MK_JFFS2) -d $(BAK_DIR_NAME) -l -e $(JFFS2_ERASE_SIZE) -o $@

# vim:noet:sw=4:ts=4

